from idlelib.tree import TreeNode
from typing import Optional

from util.log import logger

class Solution:
    def maxDeath(self, root: Optional[TreeNode]) -> int:
        if root in None:
            return 0
        letfmaxdea = self.maxDeath(root.left)
        rightmaxdea = self.maxDeath(root.right)
        return max(letfmaxdea,rightmaxdea) + 1



Optional = [1,2,4,5,6,7,8]
slo = Solution
slo.maxDeath(Optional)